#include <QCoreApplication>
#include <QDesktopServices>
#include "orionapp.h"
#include "orionmainwindow.h"

OrionApp::OrionApp(int argc, char**argv)
    : QApplication(argc, argv)
{
    QCoreApplication::setOrganizationName(QLatin1String("BugSec Team"));
    QCoreApplication::setApplicationName(QLatin1String("orionsec"));
    QCoreApplication::setApplicationVersion(QLatin1String("0.1"));

    QDesktopServices::setUrlHandler(QString("http"), this, "openUrl");

    newMainWindow();
}

OrionApp::~OrionApp()
{

}

OrionMainWindow* OrionApp::newMainWindow()
{
    OrionMainWindow* newMainWindow = new OrionMainWindow;
    newMainWindow->show();
    mainWindows.prepend(newMainWindow);
    return newMainWindow;
}

void OrionApp::openUrl(const QUrl &url)
{

}
